package com.zyh.thread.demo4;

/**
 * @Author zyh
 * @Date 2024/8/8 14:57
 * @Description 消费者任务
 */

public class MyTask02 implements Runnable{
    private Stack stack;

    public MyTask02() {
    }

    public MyTask02(Stack stack) {
        this.stack = stack;
    }

    @Override
    public  void run() {
        while (true) {
            stack.eat();
        }
    }
}
